$(document).ready(function(){
    $('#login-form').submit(function(){
        var username = $('#username').val();
        var password = $('#password').val();
        
        if(username == ""){
            $('#error-msg-div').text('no username');
            return false;
        }
        
        if(password == ""){
            $('#error-msg-div').text('no password');
            return false;
        }
    });
    
});